<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="col-sm-12 search-collapse">
			<div >
			<h1>企业信息</h1>
			<h2 class="row">
				<div class="col-xs-3">
					<small >企业名称 ：</small>
					<small class=" l-companyName" th:text="${company.companyName}"></small>
				</div>
				<div class="col-xs-3">
					<small   class="">机构代码 :  </small>
					<small class=" l-companyOrgNum" th:text="${company.companyOrgNum}" ></small>
				</div>
				<div class="col-xs-3">
					<small>联系人 : </small>
					<small class="l-connectPeople" th:text="${company.connectPeople}"> </small>
				</div>
				<div class="col-xs-3">
					<small   class="">联系人身份证号 :  </small>
					<small class=" l-companyOrgNum" th:text="${company.idCardNum}" ></small>
				</div>
			</h2>
			<h2 class="row">
				<div class="col-xs-3">
					<small >联系方式 ： </small>
					<small class="l-connectPeople" th:text="${company.companyPhone}"></small>
				</div>
				<div class="col-xs-3">
					<small >企业所在地市行政区划分 ： </small>
					<small class="l-connectPeople" th:text="${company.companyLocationCode}"></small>
				</div>
				<div class="col-xs-3">
					<small >详细地址 : </small>
					<small class="  l-companyAddress" th:text="${company.companyAddress}" ></small>
				</div>
				<div class="col-xs-3">
					<small>企业申请指挥部ID ：</small>
					<small  th:text="${company.companyApplyControId}"> </small>
				</div>
<!--				<div class="col-xs-3">-->
<!--					<small>申请返回时间 ：</small>-->
<!--					<small class="l-companyApplyTime"  th:text="${#dates.format(company.companyApplyTime,'yyyy-MM-dd')}"> </small>-->
<!--				</div>-->

			</h2>
		</div>
		</div>
		<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
			<a class="btn btn-success" onclick="$.operate.add2(700,400)" shiro:hasPermission="system:pc:add">
				<i class="fa fa-plus"></i> 添加批次
			</a>
		</div>
		 <div class="col-sm-12 select-table table-striped">
			 <table id="bootstrap-table" class="table table-bordered table-hover" data-mobile-responsive="true"></table>
		 </div>
	</div>
     <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:pc:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:pc:remove')}]];
        var prefix = ctx + "system/pc";
        var company={};
        var companyId ="";
		$.ajax({
			type: "post",
			url: ctx + "system/company/listSelf",
			data: {
			},
			success: function(r) {
				company=r;
				$("#companyId").val(r.companyId)
				$(function() {
					var options = {
						url: prefix + "/list/"+r.companyId,
						createUrl: prefix + "/add/"+company.companyId,
						updateUrl: "/system/people/dept/{id}",
						removeUrl: prefix + "/remove",
						exportUrl: prefix + "/export",
						modalName: "批次",
						search:false,
						showRefresh:false,
						showColumns:false,
						showToggle:false,
						showSearch:false,
						showExport: false,
						showDropdown:false,
						columns: [
							{
								field : 'pcId',
								title : '批次号',
								sortable: true
							},
							{
								field : 'createTime',
								title : '创建时间',
								sortable: true
							},
							{
								field : 'peopleId',
								title : '返岗类型',
								sortable: true
							},
							{
								field : 'remark',
								title : '申请返岗时间',
								sortable: true
							},
							{
								field : 'applyStatusOne',
								title : '复工审批',
								sortable: true
							},
							{
								field : 'applyStatusTwo',
								title : '返岗审批',
								sortable: true
							},
							{
								title: '操作',
								align: 'center',
								formatter: function(value, row, index) {
									var actions = [];
									actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editWindow(\'' + row.pcId + '\',\'' + "/system/people/dept/" + '\',\'' + "人员详情" + '\')"><i class="fa fa-edit"></i>查看</a> ');
									if(!row.applyStatusOne||row.applyStatusOne=="审核不通过"||row.applyStatusOne=="未提交"){
										actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.remove(\'' + row.pcId + '\')"><i class="fa fa-edit"></i>删除</a> ');
									}
									return actions.join('');
								}
							}
							]
					};
					$.table.init(options);
				});
			}

		});
		function addAuto(){
			var s="companyId="+company.companyId
			$.operate.saveOnPage(prefix + "/add", s);
		}


    </script>
</body>
</html>